package cn.matezk.cloud.beans;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import lombok.Data;

import java.util.Date;

@Data
public class DeviceExt {
    private String DeviceId;
    private Integer Online;
    private Integer Switch1;
    private Integer DetectState1;
    private Integer Amount;
    private Date ExpireDate;

    private JSONObject Reported;

    public DeviceExt self() {
        return this;
    }

    public JSONObject getReported() {
        return ObjectUtil.isNull(Reported) ? JSONUtil.createObj() : Reported;
    }
}
